from unittest import defaultTestLoader
from HTMLTestRunner import HTMLTestRunner

tests = defaultTestLoader.discover(r"E:\PythonTest\venv\html","*Test.py")

runner = HTMLTestRunner.HTMLTestRunner(stream=open("CalcReport.html",mode="w+",encoding="utf-8"),
                                       verbosity=2,
                                       title="计算器的测试报告",
                                       description="这是加减乘除的测试报告")

runner.run(tests)